package com.book.format;

/**
 * Created by Mikey on 2017/6/10.
 */
public class ResultUtil {

    public static Result success(Object object){
        Result result = new Result();
        result.setCode("0");
        result.setMsg("success");
        result.setData(object);
        return result;
    }

    public static Result success(){
        return success(null);
    }

    public static Result error(String code,String msg){
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        result.setData(null);
        return result;
    }
}
